/***********************************************************************
    filename:   DaterUser.h
    created:    10/4/2012
    author:     4Ys

    purpose:    Defines abstract base class for User objects
*************************************************************************/
#ifndef _DaterUser_h_
#define _DaterUser_h_

//#include "DaterCalendar.h"

#include <queue>

namespace Dater
{
	/*!
	\brief
		An abstract base class of any user.
	*/
	class User
	{
	public:
		/*!
		\brief
			Constructor of the class.

		\param name
			- a string means the name of the user

		\param state
			- a string means the current state of the user
			- edited by user himself.
		*/
		User(const std::string& hypocorism, int uid, const std::string gender, const std::string birthday, const std::string& state = "");

		/*!
		\brief
			Destructor of user object.
		*/
		~User();

		/*!
		\brief
			return the uid of the user

		\return
			the uid of the user.
		*/
		int getUid();

		/*!
		\brief
			return the hypocorism of the User
		
		\return 
			the hypocorism of the User
		*/
		std::string& getHypocorism();

		///*!
		//\brief
		//	return the calendar of the User

		//	The current version of Dater restrict one User can only have one Calendar.

		//\return
		//	A pointer point to the Calendar of the User
		//*/
		//Calendar* getCalendar();

		/*!
		\brief
			return the state of the User

		\return
			a string means the state of the User
		*/
		std::string& getState();

		std::string& getEmail(){return _email;}

		std::string& getAccount(){return _account;}

		std::string& getGender(){return _gender;}

		std::string& getBirthday(){return _birthday;}

		void setHypocorism(const std::string& hypocorism){_hypocorism = hypocorism;}

		void setState(const std::string& state){_state = state;}

		void setEmail(const std::string& email){_email = email;}

		void setAccount(const std::string& account){_account = account;}
	
	protected:
		int _uid;

		std::string _email;

		std::string _account;

		std::string _hypocorism;

		std::string _gender;

		std::string _birthday;

		std::string _state;
		
		//Calendar* _calendar;

	private:
		User(const User&) {}
		User& operator=(const User&) {return *this;}
	};

}

#endif